package week8;

import week6.BinaryTreeNode;

// HeapNode表示一个带有父指针的二叉树节点，用于堆中。
public class HeapNode<T> extends BinaryTreeNode<T>
{
    protected HeapNode<T> parent;

    public HeapNode(T obj) 
    {
        super(obj);
        parent = null;
    }

    public HeapNode<T> getParent() 
    {
        return parent;
    }

    public void setElement(T obj) 
    {
        element = obj;
    }

    public void setParent(HeapNode<T> node) 
    {
        parent = node;
    }
}


